4 Fonctions logarithmes ===================== .. _définition-1: 4.1 Définition ---------- Comme les fonctions :math:`{\exp}_a : \mathbb{R}\to \mathbb{R}` sont des fonctions strictement monotones et continues de :math:`\mathbb{R}` dans :math:`{\mathbb{R}}_{0}^{+}` pour tout :math:`a \in {\mathbb{R}}_{0}^{+}\backslash \{1\}`, le théorème de la bijection (théorème 3.2.7) et les propositions 3.2.4et 3.2.5 nous assurent qu’il existe une unique fonction réciproque définie sur :math:`{\mathbb{R}}_{0}^{+}` à chacune de ces fonctions : **Définition 4.1.1** Soit :math:`a \in {\mathbb{R}}_{0}^{+}\backslash \{1\}`. La fonction *logarithme* de base :math:`a`, notée :math:`{\log}_{a}`, est la fonction réciproque de la fonction exponentielle de base :math:`a`. **Remarque 4.1.2** Pour :math:`a \in {\mathbb{R}}_{0}^{+}\backslash \{1\}`, la fonction exponentielle de base :math:`a` a comme domaine :math:`\mathbb{R}` et comme image :math:`{\mathbb{R}}_{0}^{+}`. La fonction logarithme de base :math:`a` a donc comme domaine :math:`{\mathbb{R}}_{0}^{+}` et comme image :math:`\mathbb{R}`. **Remarque 4.1.3** Pour :math:`a \in {\mathbb{R}}_{0}^{+}\backslash \{1\}`, par définition de la fonction logarithme de base :math:`a` comme réciproque de la fonction exponentielle de base :math:`a`, on a : #. Pour tout :math:`x \in \mathbb{R}` : .. math:: {\log}_{a}(a^x) = x #. Pour tout :math:`y \in {\mathbb{R}}_{0}^{+}` : .. math:: a^{{\log}_{a}(y)}= y Ces simples égalités, qui caractérisent les fonctions logarithmes, sont très utiles lorsqu’on souhaite par exemple utiliser des fonctions logarithmes pour résoudre des équations. **Exemple 4.1.4** Intéressons-nous un instant à la fonction :math:`{\log}_2 : {\mathbb{R}}_{0}^{+}\to \mathbb{R}` pour bien comprendre ce que sont les fonctions logarithmes. Que vaut par exemple :math:`{\log}_2 (1)` ? Puisque la fonction :math:`{\log}_2` est la réciproque de la fonction :math:`{\exp}_2`, le nombre :math:`{\log}_2 (1)` est le nombre réel :math:`x \in \mathbb{R}` tel que :math:`{\exp}_2 (x) = 2^x = 1`. Nous connaissons ce nombre, il s’agit de :math:`0` car :math:`2^0=1` ! En conclusion : :math:`{\log}_2 (1)=0`. Autre exemple : que vaut par exemple :math:`{\log}_2 (2)` ? Puisque la fonction :math:`{\log}_2` est la réciproque de la fonction :math:`{\exp}_2`, le nombre :math:`{\log}_2 (2)` est le nombre réel :math:`x \in \mathbb{R}` tel que :math:`{\exp}_2 (x) = 2^x = 2`. Nous connaissons ce nombre, il s’agit de :math:`1` car :math:`2^1=2` ! En conclusion : :math:`{\log}_2 (2)=1`. Un dernier exemple : que vaut par exemple :math:`{\log}_2 (8)` ? Puisque la fonction :math:`{\log}_2` est la réciproque de la fonction :math:`{\exp}_2`, le nombre :math:`{\log}_2 (8)` est le nombre réel :math:`x \in \mathbb{R}` tel que :math:`{\exp}_2 (x) = 2^x = 8`. Nous connaissons ce nombre, il s’agit de :math:`3` car :math:`2^3=8` ! En conclusion : :math:`{\log}_2 (8)=3`. Bref, le logarithme de base :math:`2` d’un nombre strictement positif est l’unique nombre :math:`x \in \mathbb{R}` tel que :math:`{\exp}_2 (x) = 2^x` est égal à ce nombre de départ. Plus généralement, le logarithme de base :math:`a` (pour :math:`a \in {\mathbb{R}}_{0}^{+}\backslash \{1\}`) d’un nombre est l’unique nombre :math:`x \in \mathbb{R}` tel que :math:`{\exp}_a (x) = a^x` est égal à ce nombre de départ. **Remarque 4.1.5** Pour :math:`a \in {\mathbb{R}}_{0}^{+}\backslash \{1\}`, puisque la fonction :math:`{\log}_a` est définie comme la fonction réciproque de la fonction :math:`{\exp}_a`, le graphe de la fonction :math:`{\log}_a` est le symétrique du graphe de la fonction :math:`{\exp}_a` par la droite d’équation cartésienne :math:`y=x`. Par exemple, voici le graphe de la fonction :math:`{\log}_2` : .. tikz:: \draw[step=1cm,gray,very thin] (-5,-5) grid (5,5); \draw[very thick,->] (-5,0) -- (6,0) node[anchor=south west] {x}; \draw[very thick,->] (0,-5) -- (0,6) node[anchor=south west] {y}; \foreach \x in {1} \draw (\x cm,1pt) -- (\x cm,-1pt) node[anchor=north] {$\x$}; \foreach \y in {1} \draw (1pt,\y cm) -- (-1pt,\y cm) node[anchor=east] {$\y$}; \draw[very thick,blue] plot[domain=0.03125:5](\x,{log2(\x)}); | Autre exemple, voici le graphe de la fonction :math:`{\log}_{\frac{1}{2}}` : .. tikz:: \draw[step=1cm,gray,very thin] (-5,-5) grid (5,5); \draw[very thick,->] (-5,0) -- (6,0) node[anchor=south west] {x}; \draw[very thick,->] (0,-5) -- (0,6) node[anchor=south west] {y}; \foreach \x in {1} \draw (\x cm,1pt) -- (\x cm,-1pt) node[anchor=north] {$\x$}; \foreach \y in {1} \draw (1pt,\y cm) -- (-1pt,\y cm) node[anchor=east] {$\y$}; \draw[very thick,blue] plot[domain=0.03125:5](\x,{-1*log2(\x)}); |   | Au cas exceptionnel de l’exponentielle (naturelle, de base :math:`e`) correspond le cas exceptionnel du logarithme népérien : **Définition 4.1.6.** La fonction *logarithme népérien*\ [1]_, notée :math:`\ln`, est la fonction logarithme de base :math:`e`, autrement dit la fonction :math:`{\log}_e : {\mathbb{R}}_{0}^{+}\to \mathbb{R}`. Tout comme la fonction exponentielle (de base :math:`e`) est reine parmi les fonctions exponentielles, le logarithme népérien est roi parmi les fonctions logarithmes. Nous découvrirons ce que le logarithme népérien a de si particulier dans la section 4.3. **Remarque 4.1.7.** Certaines personnes notent simplement :math:`\log` pour la fonction logarithme en base :math:`10`. D’autres personnes (moins nombreuses) notent simplement :math:`\log` pour le logarithme en base :math:`2`. Dans ce cours, nous n’utiliserons aucune de ces deux notations (et je vous conseille de faire de même). .. _propriétés-élémentaires-1: 4.2 Propriétés élémentaires ----------------------- Nous avions listé les propriétés des fonctions exponentielles, faisons de même pour les fonctions logarithmes. **Proposition 4.2.1.** Soit :math:`a \in {\mathbb{R}}_{0}^{+}\backslash \{1\}`. Le domaine de définition de la fonction :math:`{\log}_a` est :math:`{\mathbb{R}}_{0}^{+}`. *Démonstration* Par définition de la fonction :math:`{\log}_a` comme réciproque de la fonction :math:`{\exp}_a`. **Proposition 4.2.2.** Soit :math:`a \in {\mathbb{R}}_{0}^{+}`. Si :math:`a=1`, l’image de la fonction :math:`{\exp}_a` est :math:`\{1\}`. Si :math:`a \neq 1`, l’image de la fonction :math:`{\exp}_a` est :math:`{\mathbb{R}}_{0}^{+}`. *Démonstration* Par définition de la fonction :math:`{\log}_a` comme réciproque de la fonction :math:`{\exp}_a`. **Proposition 4.2.3.** Soit :math:`a \in {\mathbb{R}}_{0}^{+}\backslash \{1\}`. Si :math:`a<1`, la fonction :math:`{\log}_a` est strictement décroissante. Si :math:`a<1`, la fonction :math:`{\log}_a` est strictement croissante. *Démonstration* Soient :math:`x,y \in {\mathbb{R}}_{0}^{+}` avec :math:`x < y`. Puisque :math:`x < y`, on sait que :math:`a^{{\log}_a (x)} < a^{{\log}_a (y)}`. Deux possibilités : #. Si :math:`a<1`, comme la fonction :math:`{exp}_a` est une bijection strictement décroissante, cela implique que :math:`{\log}_a (x) > {\log}_a (y)`. La fonction :math:`{\log}_a` est donc bien strictement décroissante. #. Si :math:`a<1`, comme la fonction :math:`{exp}_a` est une bijection strictement croissante, cela implique que :math:`{\log}_a (x) < {\log}_a (y)`. La fonction :math:`{\log}_a` est donc bien strictement croissante. **Proposition 4.2.4.** Soit :math:`a \in {\mathbb{R}}_{0}^{+}\backslash \{1\}`. La fonction :math:`{\log}_a` est continue. *Démonstration* Par le théorème 3.2.7, puisque la fonction :math:`{\exp}_a` est une fonction strictement monotone continue définie sur un intervalle, c’est une bijection et sa fonction réciproque, c’est-à-dire la fonction :math:`{\log}_a`, est nécessairement continue. La limite en un point :math:`c \in {\mathbb{R}}_{0}^{+}` d’une fonction logarithme est donc toujours égale à son image en ce point. Par ailleurs, on a : **Proposition 4.2.5.** Soit :math:`a \in {\mathbb{R}}_{0}^{+}\backslash \{1\}`. Si :math:`a<1`, on a :math:`\lim\limits_{x \to 0} {\log}_a(x) = +\infty` et :math:`\lim\limits_{x \to +\infty} {\log}_a(x) = -\infty`. Si :math:`a>1`, on a :math:`\lim\limits_{x \to 0} {\log}_a(x) = -\infty` et :math:`\lim\limits_{x \to +\infty} {\log}_a(x) = +\infty`. *Démonstration* Découle directement de la définition des fonctions logarithmes et de la proposition 2.2.7. Vient à présent un des résultats les plus importants au sujet des fonctions logarithmes. Celui-ci est l’équivalent de la proposition 2.2.8 des fonctions exponentielles. **Proposition 4.2.6.** Soient :math:`a,b \in {\mathbb{R}}_{0}^{+}\backslash \{1\}`. #. Pour tout :math:`x,y \in {\mathbb{R}}_{0}^{+}`, on a : .. math:: {\log}_{a}(x.y) = {\log}_{a}(x)+{\log}_{a}(y) #. Pour tout :math:`x,y \in {\mathbb{R}}_{0}^{+}`, on a : .. math:: {\log}_{a}\left(\frac{x}{y}\right) = {\log}_{a}(x)-{\log}_{a}(y) #. Pour tout :math:`x \in {\mathbb{R}}_{0}^{+}` et pour tout :math:`y \in {\mathbb{R}}_{0}^{+}`, on a : .. math:: {\log}_{a}(x^y) = y.{\log}_{a}(x) *Démonstration* #. Pour tout :math:`x,y \in {\mathbb{R}}_{0}^{+}`, comme la fonction logarithme en base :math:`a` est la réciproque de la fonction exponentielle de base :math:`a`, par la proposition 2.2.8 : .. math:: {\log}_{a}(x.y) = {\log}_{a}(a^{{\log}_{a}(x)}.a^{{\log}_{a}(y)}) ={\log}_{a}(a^{{\log}_{a}(x)+{\log}_{a}(y)})={\log}_{a}(x)+{\log}_{a}(y) #. Pour tout :math:`x,y \in {\mathbb{R}}_{0}^{+}`, comme la fonction logarithme en base :math:`a` est la réciproque de la fonction exponentielle de base :math:`a`, par la proposition 2.2.8 : .. math:: {\log}_{a}\left(\frac{x}{y}\right) ={\log}_{a}\left(\frac{a^{{\log}_{a}(x)}}{a^{{\log}_{a}(y)}}\right) = {\log}_{a}(a^{{\log}_{a}(x)-{\log}_{a}(y)})={\log}_{a}(x)-{\log}_{a}(y) #. Pour tout :math:`x \in {\mathbb{R}}_{0}^{+}` et pour tout :math:`y \in {\mathbb{R}}_{0}^{+}`, , comme la fonction logarithme en base :math:`a` est la réciproque de la fonction exponentielle de base :math:`a`, par la proposition 2.2.8 : .. math:: {\log}_{a}(x^y)={\log}_{a}((a^{{\log}_{a}(x)})^y) = {\log}_{a}(a^{{\log}_{a}(x).y})=y.{\log}_{a}(x) **Remarque 4.2.7.** De la même manière que la proposition 2.2.8 caractérisait les fonctions exponentielles, cette dernière proposition caractérise les fonctions logarithmes, en particulier la première formule. Les fonctions logarithmes sont des fonctions qui permettent de transformer des produits en sommes (c’est d’ailleurs précisément la raison pour laquelle ils ont été inventés à la base). .. _dériloga: 4.3 Dérivées des fonctions exponentielles et logarithmes ---------------------------------------------------- Les fonctions logarithmes sont continues, mais sont-elles dérivables ? Commençons avec une seule d’entre elle : le logarithme népérien. **Proposition 4.3.1.** La fonction :math:`\ln : {\mathbb{R}}_{0}^{+}\to \mathbb{R}` est dérivable et sa dérivée est la fonction : .. math:: \begin{aligned} f : {\mathbb{R}}_{0}^{+}&\to \mathbb{R}\\ x \mapsto& \frac{1}{x}\end{aligned} *Démonstration *Par le théorème 3.2.7, comme la fonction :math:`\ln : {\mathbb{R}}_{0}^{+}\to \mathbb{R}` est la réciproque de la fonction exponentielle de base :math:`e` qui est dérivable et dont la dérivée ne s’annule jamais, elle est dérivable. De plus, on sait qu’on a pour tout :math:`x \in {\mathbb{R}}_{0}^{+}` : .. math:: e^{\ln(x)}=x Si la fonction du membre de gauche de l’équation est égale à la fonction du membre de droite de l’équation, alors la dérivée de la fonction du membre de gauche de l’équation doit être égale est à la dérivée de la fonction du membre de droite de l’équation. On doit avoir pour tout :math:`x \in {\mathbb{R}}_{0}^{+}` : .. math:: (e^{\ln(x)})'=(x)' Comme la dérivée de la fonction exponentielle est elle-même, par la formule de la dérivée de la composée de deux fonctions dérivables : .. math:: e^{\ln(x)}.(\ln(x))'=1 Comme pour tout :math:`x \in {\mathbb{R}}_{0}^{+}`, :math:`e^{\ln(x)} > 0`, on a donc pour tout :math:`x \in {\mathbb{R}}_{0}^{+}` : .. math:: (\ln(x))'=\frac{1}{e^{\ln(x)}}=\frac{1}{x} **Remarque 4.3.2.** Nous avons donc finalement trouvé une primitive de la fonction inverse (sur :math:`{\mathbb{R}}_{0}^{+}`) ! Il s’agit de la fonction :math:`\ln` ! Nous sommes donc à présent capables de trouver une primitive pour chaque fonction de référence. Pour étudier la dérivabilité des autres fonctions logarithmes, nous aurons besoin de l’extrêmement utile résultat suivant : **Proposition 4.3.3.** (Formule de changement de base pour les logarithmes)  Soit :math:`a,b \in {\mathbb{R}}_{0}^{+}\backslash \{1\}`. Alors pour tout :math:`x \in {\mathbb{R}}_{0}^{+}` on a : .. math:: {\log}_a(x) = \frac{{\log}_b(x)}{{\log}_b(a)} *Démonstration* Soit :math:`x \in {\mathbb{R}}_{0}^{+}`. On a : .. math:: {\log}_b(x) = {\log}_b(a^{{\log}_a(x)})={\log}_a(x).{\log}_b(a) Comme :math:`b \neq 1`, :math:`{\log}_b(a)\neq 0` et donc : .. math:: \frac{{\log}_b(x)}{{\log}_a(b)}={\log}_a(x) **Remarque 4.3.4** La formule du changement de base permet par exemple de calculer un logarithme dans une base choisie avec n’importe quel calculatrice scientifique. En effet, si on souhaite par exemple calculer une approximation de :math:`{\log}_3 (7)` mais que la calculatrice ne propose pas la fonction :math:`{\log}_3`, il suffit de calculer :math:`\frac{{\ln}(7)}{{\ln}(3)}`. **Proposition 4.3.5** Soit :math:`a \in {\mathbb{R}}_{0}^{+}\backslash \{1\}`. La fonction :math:`{\log}_{a} : {\mathbb{R}}_{0}^{+}\to \mathbb{R}` est dérivable et sa dérivée est la fonction : .. math:: \begin{aligned} f : {\mathbb{R}}_{0}^{+}&\to \mathbb{R}\\ x \mapsto& \frac{1}{\ln(a)}.\frac{1}{x}\end{aligned} *Démonstration* Par la formule du changement de base, on a pour tout :math:`x \in {\mathbb{R}}_{0}^{+}` : .. math:: {\log}_a(x)=\frac{{\ln}(x)}{{\ln}(a)} La fonction :math:`{\log}_{a} : {\mathbb{R}}_{0}^{+}\to \mathbb{R}` est donc dérivable et par linéarité de la dérivée, on a pour tout :math:`x \in {\mathbb{R}}_{0}^{+}` : .. math:: ({\log}_a(x))' =\left(\frac{{\ln}(x)}{{\ln}(a)}\right)' = \frac{1}{\ln(a)}(\ln(x))' = \frac{1}{\ln(a)}.\frac{1}{x} Finalement, nous sommes capables de montrer que toutes les fonctions exponentielles sont dérivables et de calculer leurs dérivées: **Proposition 4.3.6** Soit :math:`a \in {\mathbb{R}}_{0}^{+}\backslash \{1\}`. La fonction :math:`{\exp}_{a} : \mathbb{R}\to \mathbb{R}` est dérivable et sa dérivée est la fonction : .. math:: \begin{aligned} f : {\mathbb{R}}_{0}^{+}&\to \mathbb{R}\\ x \mapsto& \ln(a).a^x\end{aligned} *Démonstration* Par le théorème 3.2.7, comme la fonction :math:`{\exp}_{a} : \mathbb{R}\to \mathbb{R}` est la réciproque de la fonction logarithme de base :math:`a` qui est dérivable et dont la dérivée ne s’annule jamais, elle est dérivable. De plus, on sait qu’on a pour tout :math:`x \in \mathbb{R}` : .. math:: {\log}_{a}(a^{x})=x Si la fonction du membre de gauche de l’équation est égale à la fonction du membre de droite de l’équation, alors la dérivée de la fonction du membre de gauche de l’équation doit être égale est à la dérivée de la fonction du membre de droite de l’équation. On doit avoir pour tout :math:`x \in \mathbb{R}` : .. math:: ({\log}_{a}(a^{x}))'=(x)' Par la formule de la dérivée de la composée de deux fonctions dérivables : .. math:: \frac{1}{\ln(a)}.\frac{1}{a^x}.(a^x)'=1 On a donc pour tout :math:`x \in \mathbb{R}` : .. math:: (a^x)'=\ln(a).a^x .. _exercices-2: 4.4 Exercices --------- **Exercice 4.4.1.** En utilisant les propriétés élémentaires des fonctions logarithmes, calculer les nombres suivants sans avoir recours à une calculatrice. .. inginious:: foncLog1_1 .. inginious:: foncLog1_2 .. inginious:: foncLog1_3 .. inginious:: foncLog1_4 **Exercice 4.4.2.** En utilisant une calculatrice et la formule de changement de base pour les logarithmes, trouver une approximation des nombres suivants à :math:`0,001` près. .. inginious:: foncLog2_1 .. inginious:: foncLog2_2 .. inginious:: foncLog2_3 .. inginious:: foncLog2_4 **Exercice 4.4.3** Donner les domaines de définition réels maximaux pour les fonctions dont les expressions sont les suivantes : .. inginious:: foncLog12_1 .. inginious:: foncLog12_2 .. inginious:: foncLog12_3 **Exercice 4.4.4.** .. inginious:: foncLog3 **Exercice 4.4.5.** Pour les fonctions suivantes, déterminer si elles convergent ou divergent pour :math:`x \to 0` et :math:`x \to +\infty`. .. inginious:: foncLog4_1 .. inginious:: foncLog4_2 .. inginious:: foncLog4_3 .. inginious:: foncLog4_4 .. inginious:: foncLog4_5 .. inginious:: foncLog4_6 .. inginious:: foncLog4_7 .. inginious:: foncLog4_8 **Exercice 4.4.6.** Calculer les dérivées des fonctions dérivables suivantes. .. inginious:: foncLog5_1 .. inginious:: foncLog5_2 .. inginious:: foncLog5_3 .. inginious:: foncLog5_4 .. inginious:: foncLog5_5 .. inginious:: foncLog5_6 .. inginious:: foncLog5_7 .. inginious:: foncLog5_8 **Exercice 4.4.7.** .. inginious:: foncLog6 **Exercice 4.4.8. et Exercice 4.4.9.** .. inginious:: foncLog7 **Exercice 4.4.10.** .. inginious:: foncLog8 **Exercice 4.4.11.** .. inginious:: foncLog9 **Exercice 4.4.12.** Calculer les intégrales des fonctions intégrables suivantes. .. inginious:: foncLog10_1 .. inginious:: foncLog10_2 .. inginious:: foncLog10_3 .. inginious:: foncLog10_4 .. inginious:: foncLog10_5 .. inginious:: foncLog10_6 .. inginious:: foncLog10_7 .. inginious:: foncLog10_8 **Exercice 4.4.13.** En utilisant les propriétés des fonctions exponentielles et logarithmes, résoudre les équations suivantes dans :math:`\mathbb{R}`. .. inginious:: foncLog11_1 .. inginious:: foncLog11_2 .. inginious:: foncLog11_3 .. inginious:: foncLog11_4 .. inginious:: foncLog11_5 .. inginious:: foncLog11_6 .. inginious:: foncLog11_7 .. inginious:: foncLog11_8 Exercices supplémentaires : `https://fr.wikiversity.org/wiki/Fonction_logarithme/Exercices/%C3%89quations\_comportant_des_exponentielles `__ **Remarque 4.4.14.** Il n’y a pas d’inéquation avec des fonctions logarithmes au programme du cours de mathématiques de 4 heures par semaine. Néanmoins, il est possible que vous ayez à résoudre une telle inéquation ultérieurement, par exemple dans un cours de physique. Si vous souhaitez vous entraîner, prenez les équations de l’exercice `[équaloga] <#équaloga>`__ et remplacez les égalités par des inégalités. **Défi 4.4.15.** Sans utiliser de calculatrice, déterminer si :math:`e^{\pi} < {\pi}^{e}` ou :math:`e^{\pi} > {\pi}^{e}` ou :math:`e^{\pi} = {\pi}^{e}`. .. [1] John Napier, ou Jean Neper en français, a vécu entre 1550 et 1617 et est considéré comme l’inventeur des logarithmes. Il a développé ceux-ci pour simplifier ses calculs d’astronomie.